Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

buffer-crc32

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buffer-crc32

A pure javascript CRC32 algorithm that plays nice with binary data

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17M
decreased by-15.38%
Maintainers
2
Weekly downloads
 
Created

What is buffer-crc32?

The buffer-crc32 package is a Node.js module for calculating CRC32 checksums of buffers. It's a fast and simple utility for generating checksums of data, which can be useful for verifying the integrity of data being transferred over a network or stored.

What are buffer-crc32's main functionalities?

Calculate CRC32 checksum

This feature allows you to calculate the CRC32 checksum of a given buffer. The code sample demonstrates how to calculate the checksum of a 'Hello World' string.

const crc32 = require('buffer-crc32');
const buffer = Buffer.from('Hello World');
const checksum = crc32(buffer);
console.log(checksum.toString('hex'));

Update existing checksum with new data

This feature enables you to update an existing checksum with new data. The code sample shows how to calculate the checksum for 'Hello', then update it with ' World' to get the checksum for 'Hello World'.

const crc32 = require('buffer-crc32');
let checksum = crc32(Buffer.from('Hello'));
checksum = crc32(Buffer.from(' World'), checksum);
console.log(checksum.toString('hex'));

Other packages similar to buffer-crc32

FAQs

Package last updated on 06 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc